﻿@model IEnumerable<MISMVC.DAO.Model.Project>

@{
	ViewBag.Title = "Project Index";
}

@section scripts{
	<script type="text/javascript">
		$(document).ready(function () {
			$('#dataTables-example').DataTable({
				responsive: true
			});
		});
	</script>
}

<div class="row panel-heading">
	<div class="col-lg-1 col-md-1 col-sm-3">
		@Html.ActionLink( "Create" , "Create" ,null, new  { @class = "btn btn-default" } )
	</div>
	<div class="col-lg-1 col-md-1 col-sm-3">
		<button class="btn btn-default">Update</button>
	</div>
	<div class="col-lg-1 col-md-1 col-sm-3">
		<button class="btn btn-default">Delete</button>
	</div>
	<div class="col-lg-1 col-md-1 col-sm-3">
		<button class="btn btn-default">Details</button>
	</div>
</div>

<div class="row">
	<div class="col-lg-12">
		<div class="panel panel-default">
			<div class="panel-body">
				<div class="dataTable_wrapper">
					<table class="table table-striped table-bordered table-hover" id="dataTables-example">
						<thead>
							<tr>
								<th>
									@Html.DisplayNameFor( model => model.Name )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.ProjectCode )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.Description )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.DocumentGroup.Name )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.Creator )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.CreateDate )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.Modifier )
								</th>
								<th>
									@Html.DisplayNameFor( model => model.ModifyDate )
								</th>
							</tr>
						</thead>
						<tbody>
							@foreach( var item in Model ) {
								<tr>
									<td>
										<input type="checkbox" value="@item.ID" />
										@Html.DisplayFor( modelItem => item.Name )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.ProjectCode )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.Description )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.DocumentGroup.Name )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.Creator )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.CreateDate )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.Modifier )
									</td>
									<td>
										@Html.DisplayFor( modelItem => item.ModifyDate )
									</td>
								</tr>
							}
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>
